<script setup lang="ts">
import { ISubBreadData } from '../type'
const props = withDefaults(
  defineProps<{
    subBreadData: ISubBreadData
  }>(),
  {}
)
</script>

<template>
  <Bread>
    <BreadItem to="/">首页</BreadItem>
    <BreadItem :to="`/category/${subBreadData.parentId}`">{{
      subBreadData.parentName
    }}</BreadItem>
    <Transition name="fade-right" mode="out-in">
      <BreadItem
        :to="`/category/sub/${subBreadData.id}`"
        :key="subBreadData.id"
        >{{ subBreadData.name }}</BreadItem
      >
    </Transition>
  </Bread>
</template>

<style lang="less" scoped></style>
